package org.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.entity.Demo;
import org.example.mapper.DemoMapper;
import org.example.service.IDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 
 * @since 2024-06-13
 */
@Service
public class DemoServiceImpl extends ServiceImpl<DemoMapper, Demo> implements IDemoService {
    @Autowired
    DemoMapper demoMapper;
    @Override
    public List listAllData() {
        QueryWrapper qw = new QueryWrapper<>();
        return demoMapper.selectList(qw);
    }

    @Override
    public List listAllDataWithOrg() {
        return demoMapper.listAllData();
    }
    @Override
    public void deleteAllData() {
        demoMapper.deleteAllData();
    }
}
